package com.mubei.seckill.exception;

import com.mubei.seckill.result.CodeMsg;

/**
 * @author 帅小伙
 * @date 2022/2/19
 * @description
 * 全局异常
 */
public class GlobalException extends RuntimeException {

    private static final long servialVersionUID = 1L;

    private CodeMsg codeMsg;

    public GlobalException(CodeMsg codeMsg) {
        super(codeMsg.toString());
        this.codeMsg = codeMsg;
    }

    public CodeMsg getCodeMsg() {
        return codeMsg;
    }
}
